# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=perl-net-cidr-lite
_realname=Net-CIDR-Lite
pkgver=0.21
pkgrel=5
pkgdesc="Perl extension for merging IPv4 or IPv6 CIDR addresses"
url="http://search.cpan.org/~dougw/Net-CIDR-Lite-0.21/"
arch="noarch"
license="Artistic-Perl-1.0 GPL+"
depends="perl"
makedepends="perl-dev"
install=
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DO/DOUGW/$_realname-$pkgver.tar.gz"

builddir="$srcdir/$_realname-$pkgver"
build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="c8a5b00a26fb823e637825eac72ca7002f401a1a623d8b77b694848975124f24fba86830df8d41f6bdba4d2e2f0f93b2b155ac1511b607efa67942189614dc7c  Net-CIDR-Lite-0.21.tar.gz"
